package cn.aixuegao.model.admin;

import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import java.sql.*;
import java.util.ArrayList;
import java.util.List;

/**
* 描述： 栏目表 实体类
* @author hxy
* @date 2018/04/28
*/

@TableName("tbl_column")
public class Column  {
	/**
	 * 主键
	 */
	 @TableId(value="id")
	private Integer id;
    /**
    *创建时间
    */
	 @TableField(value="create_time")
    private Timestamp createTime;
    /**
    *栏目名称
    */
    @TableField(value="column_name")
    private String columnName;
    /**
    *父id
    */
    @TableField(value="pid")
    private Integer pid;
    /**
    *用户id
    */
    @TableField(value="user_id")
    private Integer userId;

    /**
     *url
     */
    @TableField(value="url")
    private Integer url;
    
    /**
     * 子节点
     */
    @TableField(exist=false)
    private List<Column> children = new ArrayList<Column>();
     
    public Column() {
		super();
	}
    
	public Column(Integer userId) {
		super();
		this.userId = userId;
	}

	public Column(Integer id, Timestamp createTime, String columnName, Integer pid, Integer userId, Integer url,
			List<Column> children) {
		super();
		this.id = id;
		this.createTime = createTime;
		this.columnName = columnName;
		this.pid = pid;
		this.userId = userId;
		this.url = url;
		this.children = children;
	}

	public List<Column> getChildren() {
		return children;
	}
	public void setChildren(List<Column> children) {
		this.children = children;
	}
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public Integer getUrl() {
		return url;
	}
	public void setUrl(Integer url) {
		this.url = url;
	}
	public Timestamp getCreateTime() {
        return this.createTime;
    }
     public void setCreateTime(Timestamp createTime) {
        this.createTime = createTime;
    }
    public String getColumnName() {
        return this.columnName;
    }
    public void setColumnName(String columnName) {
        this.columnName = columnName==null?null:columnName.trim();
    }
    public Integer getPid() {
        return this.pid;
    }
     public void setPid(Integer pid) {
        this.pid = pid;
    }
    public Integer getUserId() {
        return this.userId;
    }
     public void setUserId(Integer userId) {
        this.userId = userId;
    }
	@Override
	public String toString() {
		return "Column [id=" + id + ", createTime=" + createTime + ", columnName=" + columnName + ", pid=" + pid
				+ ", userId=" + userId + ", url=" + url + "]";
	}
}